<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@include file="common/header.jsp" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<script src="${pageContext.request.contextPath}/statics/vendors/jquery/dist/jquery.js"></script>
<script src="${pageContext.request.contextPath}/statics/js/app_check.js"></script>
<div id="content">
    <div class="inner" style="min-height: 700px;">
                <div class="row">
                    <div class="col-lg-12">
                        <h1> 管理员操作界面！ </h1>
                    </div>
                </div>
        <form method="post" action="${pageContext.request.contextPath}/admin/applist">
            <input type="hidden" name="pageIndex" value="1">
        <div class="row">
                <div class="col-lg-12">
                        <div class="box">
                            <header>
                                <h5>Application Basic Infomation</h5>
                                <div class="toolbar">
                                    <div class="btn-group">
                                        <a href="#sortableTable" data-toggle="collapse" class="btn btn-default btn-sm accordion-toggle minimize-box">
                                            <i class="icon-chevron-up"></i>
                                        </a>
                                    </div>
                                </div>
                            </header>
                            <div id="sortableTable" class="body collapse in">
                                <table class="table table-bordered sortableTable responsive-table">
                                    <thead>
                                    <tr>
                                        <th>软件名称<i class="icon-sort"></i><i class="icon-sort-down"></i> <i class="icon-sort-up"></i></th>

                                        <th>APK名称<i class="icon-sort"></i><i class="icon-sort-down"></i> <i class="icon-sort-up"></i></th>

                                        <th>软件大小(单位:M)<i class="icon-sort"></i><i class="icon-sort-down"></i> <i class="icon-sort-up"></i></th>

                                        <th>所属平台<i class="icon-sort"></i><i class="icon-sort-down"></i> <i class="icon-sort-up"></i></th>

                                        <th>所属分类(一级分类、二级分类、三级分类)<i class="icon-sort"></i><i class="icon-sort-down"></i> <i class="icon-sort-up"></i></th>

                                        <th>状态<i class="icon-sort"></i><i class="icon-sort-down"></i> <i class="icon-sort-up"></i></th>

                                        <th>下载次数<i class="icon-sort"></i><i class="icon-sort-down"></i> <i class="icon-sort-up"></i></th>

                                        <th>最新版本号<i class="icon-sort"></i><i class="icon-sort-down"></i> <i class="icon-sort-up"></i></th>
                                        <th style="width:130px;">操作</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    <c:forEach var="appInfoList" items="${appInfoList}">
                                        <tr>
                                            <td>${appInfoList.softwareName}</td>
                                            <td>${appInfoList.APKName}</td>
                                            <td>${appInfoList.softwareSize}</td>
                                            <td>${appInfoList.flatformName}</td>
                                            <td>${appInfoList.categoryLevel1Name}-\-${appInfoList.categoryLevel2Name}-\-${appInfoList.categoryLevel3Name}</td>
                                            <td><span id="appInfoStatus${appInfoList.id}">${appInfoList.statusName }</span></td>
                                            <td>${appInfoList.downloads}</td>
                                            <td>${appInfoList.versionNo}</td>
                                            <td>
                                                <div class="btn-group">
                                                    <button data-toggle="dropdown" class="btn dropdown-toggle">操作
                                                        <span class="caret"></span>
                                                    </button>
                                                    <ul class="dropdown-menu">
                                                        <li>
                                                            <a>
                                                                <span class="check_a" appinfoid=${appInfoList.id}>审核通过</span>
                                                            </a>
                                                        </li>

                                                        <li>
                                                            <a>
                                                                <span class="check_b" appinfoid=${appInfoList.id}>审核未通过</span>
                                                            </a>
                                                        </li>
                                                    </ul>
                                                </div>
                                            </td>
                                        </tr>
                                    </c:forEach>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                        <div class="col-sm-5">
                            <div class="dataTables_info" id="datatable-responsive_info"
                                 role="status" aria-live="polite">
                                共${totalCount}条记录 ${currentPageNo}/${totalPageCount}页
                            </div>
                        </div>
                        <div class="col-sm-7">
                            <div class="dataTables_paginate">
                                <ul class="pagination">
                                    <c:if test="${currentPageNo>1}">
                                        <li >
                                            <a href="javascript:page_nav(document.forms[0],1);" class="btn btn-default btn-sm btn-line">首页</a>
                                        </li>
                                        <li >
                                            <a href="javascript:page_nav(document.forms[0],${pages.currentPageNo-1});" class="btn btn-default btn-sm btn-line">上一页</a>
                                        </li>
                                    </c:if>
                                    <c:if test="${totalPageCount>currentPageNo}">
                                        <li >
                                            <a href="javascript:page_nav(document.forms[0],${pages.currentPageNo+1});" class="btn btn-default btn-sm btn-line">下一页</a>
                                        </li>
                                        <li >
                                            <a href="javascript:page_nav(document.forms[0],${totalPageCount});" class="btn btn-default btn-sm btn-line">最后一页</a>
                                        </li>
                                    </c:if>
                                </ul>
                            </div>
                        </div>
                </div>
           </div>
        </div>
    </div>
<%@include file="common/footer.jsp" %>
        <script src="${pageContext.request.contextPath}/statics/js/rollpage.js"></script>
        <script src="${pageContext.request.contextPath}/statics/js/appinfo.js"></script>